namespace Wilco.CodeHilighter.Engine.SyntaxHighlighting
{
    using System;

    /// <summary>
    /// Represents a string entity.
    /// </summary>
    public class StringEntity : Entity
    {
        #region Fields

        private string escape;

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Initializes a new instance of a <see cref="Wilco.CodeHilighter.Engine.SyntaxHighlighting.StringEntity"/> struct.
        /// </summary>
        /// <param name="start">The string which indicates the start of a string.</param>
        /// <param name="end">The string which indicates the end of a string.</param>
        /// <param name="escape">The string which is used to escape the end.</param>
        public StringEntity(string start, string end, string escape)
            : base(start, end)
        {
            this.escape = escape;
        }

        #endregion Constructors

        #region Properties

        /// <summary>
        /// Gets the string which is used to escape the end.
        /// </summary>
        public string Escape
        {
            get
            {
                return this.escape;
            }
        }

        #endregion Properties
    }
}